# -*- coding: utf-8 -*-

"""
@author: l
@Remark: 	
设备最新状态记录表管理
"""
from app.device.models import DeviceStates
from dvadmin.utils.serializers import CustomModelSerializer
from dvadmin.utils.viewset import CustomModelViewSet


class DevicestatesSerializer(CustomModelSerializer):
    """
    序列化器
    """

    class Meta:
        model = DeviceStates
        fields = "__all__"
        read_only_fields = ["id"]


class DevicestatesViewSet(CustomModelViewSet):
    """
    设备最新状态记录表接口
    list:设备最新状态记录表查询
    create:设备最新状态记录表新增
    update:设备最新状态记录表修改
    retrieve:设备最新状态记录表单例
    destroy:设备最新状态记录表删除
    multiple_delete:设备最新状态记录表多删
    """
    queryset = DeviceStates.objects.all()
    serializer_class = DevicestatesSerializer
    # filter_fields = ['creator_id']

    # permission_classes = []
